#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f3f3f3f3f;

void solve()
{
	int n, s;
	cin >> n >> s;
	vector<int> a(n);
	int sum = 0;
	int c0 = 0, c1 = 0, c2 = 0;
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
		sum += a[i];
		c0 += a[i] == 0;
		c1 += a[i] == 1;
		c2 += a[i] == 2;
	}
	if (sum > s)
	{
		for (int i = 0; i < n; i++) cout << a[i] << ' ';
		cout << endl;
	}
	else if (sum == s) cout << -1 << endl;
	else if (s - sum == 1)
	{
		for (int i = 0; i < c0; i++) cout << 0 << ' ';
		for (int i = 0; i < c2; i++) cout << 2 << ' ';
		for (int i = 0; i < c1; i++) cout << 1 << ' ';
	}
	else cout << -1 << endl;
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int _ = 1;
	cin >> _;
	while (_--)
	{
		solve();
	}
	return 0;
}